<?php
$Search = Dracosys::getSessionValue(SESSION_INTERFACE, 'SearchResult');
?>
<h2>Resultado da Busca</h2>
<section id="Result">
    <section id="Result_Dados" class="section-update">
        <?php if(!empty($Search)): ?>
            <table id="Result_customer" class="list">
                <thead>
                    <tr>
                        <th>Cliente</th>
                        <th>Email</th>
                        <th>Status</th>
                        <th>Tipo de Cliente</th>
                        <th>Plano</th>
                        <th>Tempo de Casa</th>
                        <th>Visualizar</th>
                    </tr>
                </thead>
                <tfoot>
                </tfoot>
                <tbody>
                    <?php foreach($Search as $Customer): ?>
                        <tr>
                            <td><?=$Customer->getCustomerName()?></td>
                            <td><?=$Customer->getArGeneralData('StEmail')?></td>
                            <td><?=$Customer->getArGeneralData('EnStatus')?></td>
                            <td><?=$Customer->getArGeneralData('EnTipoCliente')?></td>
                            <td><?=$Customer->getFinanceiro()->getPlano()->getStNome()?></td>
                            <td><?=$Customer->getHomeTime() . ' dias'?></td>
                            <td>
                                <a href="<?=DRA_URL?>cliente/visualizar-cliente/id/<?=$Customer->getIDCliente()?>">
                                    <img src="<?= DRA_VIEW_URL ?>/images/descricao.png" alt="Visualizar" />
                                </a>
                            </td>

                        </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
        <?php else: ?>
            <div class="no-data">Nenhum Chamado foi encontrado</div>
        <?php endif; ?>
    </section>
</section>